Skip to content

Support multiple custom Whisper.cpp models - #1614

Merged
raivisdejus merged 7 commits into
chidiwilliams:mainfrom
Shai34:feature/multiple-whisper-cpp-custom-models
Sep 11, 2026
Merged

raivisdejus merged 7 commits into
chidiwilliams:mainfrom
Shai34:feature/multiple-whisper-cpp-custom-models

Conversation

@Shai34

@Shai34 Shai34 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What & why

Buzz currently supports a single custom Whisper.cpp model, stored at a fixed
ggml-model-whisper-custom.bin path. Users who work with several fine-tuned
Whisper.cpp models can only keep one at a time.

A real example: transcribing Hebrew lectures, a fine-tuned Large-v3 Turbo
model is fast enough for everyday use, while a fine-tuned Large-v3 model is kept
for the occasional recording that needs higher accuracy. Both are ggml models;
today Buzz can only hold one as the custom model.

This PR generalises the single custom model into a small registry of custom
Whisper.cpp models, without touching the Whisper.cpp engine itself.

Changes

  • Registry (buzz/settings/whisper_cpp_custom_models.py): any number of
    custom models {id, name, path, source_url}, persisted in the existing
    QSettings store.
  • TranscriptionModel.custom_model_id: resolves to a registered model's
    path. When None, the legacy fixed path is used.
  • Preferences UI: lists each custom model by name; add from a local file
    (registered in place, not copied) or a download URL; delete.
  • Model selector: custom models are listed by name and selectable
    independently.
  • Validation: a GGML/GGUF magic-header check rejects files Whisper.cpp
    can't load (technical only — it does not judge language/quality).
  • CLI: --custom-model-id.
  • Tests and docs.

Backward compatibility

  • An existing ggml-model-whisper-custom.bin is surfaced automatically as
    "Custom Whisper.cpp Model" — not moved or re-downloaded.
  • TranscriptionModel objects persisted by older versions (without
    custom_model_id) keep resolving to the legacy path.
  • The Whisper.cpp engine and the language-detection plugin are unchanged;
    custom models stay excluded from automatic "largest model" selection.

Testing

Added unit tests for validation, the registry (add/get/remove, many models,
persistence), legacy compatibility, and custom-id path resolution.

Shai34 and others added 6 commits September 11, 2026 18:37
Introduce a registry (persisted in the existing QSettings store) that can hold
any number of user-defined Whisper.cpp custom models, each with its own name and
model file. TranscriptionModel gains an optional custom_model_id that resolves to
a registered model's path; when it is None the legacy single-custom-model path is
used, so existing users and previously persisted models keep working unchanged.

Also adds an offline GGML/GGUF magic-header validity check and routes custom
model downloads/deletes per model instead of to one fixed filename.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… CLI

The Models preferences screen now lists each registered Whisper.cpp custom model
by name and lets users add one from a local file (registered in place, no copy)
or a download URL, with a basic GGML/GGUF validity check that rejects incompatible
files. The transcription model selector lists custom models by name so they can be
picked independently. Deleting a custom model unregisters it and only removes the
file when Buzz owns it. A --custom-model-id CLI option selects one non-interactively.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Cover model-file validation, the registry (add/get/remove, many models,
persistence, single-target removal), legacy single-model compatibility, and
custom-id path resolution including objects persisted without the new field.
Document how to add, select and delete custom models and how existing custom
models are preserved on upgrade.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@raivisdejus
raivisdejus force-pushed the feature/multiple-whisper-cpp-custom-models branch from 252c172 to 26be0f2 Compare September 11, 2026 15:54
@raivisdejus

Copy link
Copy Markdown
Collaborator

@Shai34 Thanks for your contribution

@codecov

codecov Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.68061% with 85 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.57%. Comparing base (710870d) to head (4bcce68).

Files with missing lines Patch % Lines
...ts/preferences_dialog/models_preferences_widget.py 46.72% 65 Missing ⚠️
...ets/transcriber/transcription_options_group_box.py 70.73% 12 Missing ⚠️
buzz/settings/whisper_cpp_custom_models.py 91.35% 7 Missing ⚠️
buzz/model_loader.py 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1614      +/-   ##
==========================================
- Coverage   83.92%   83.57%   -0.35%     
==========================================
  Files         112      113       +1     
  Lines       12773    12990     +217     
==========================================
+ Hits        10720    10857     +137     
- Misses       2053     2133      +80     
Flag Coverage Δ
Linux 82.80% <67.68%> (-0.32%) ⬇️
macOS 83.07% <67.68%> (-0.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@raivisdejus
raivisdejus merged commit f70a02f into chidiwilliams:main Sep 11, 2026
13 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants